/** Interactive Surface  FYP- 25 Interactive Surface FYP- 25 Interactive Surface FYP- 25
 *
 *  @author Acer
 */
package insurface;

import com.googlecode.javacv.cpp.opencv_core.IplImage;
import controller.Controller;
import setting.InitialSettings;
import setting.SurfaceSettings;

/** Interactive Surface FYP- 25 Interactive Surface FYP- 25 Interactive Surface FYP- 25
 *  General Information about this class -
 *  Comments -
 */
public class InteractiveSurface extends javax.swing.JFrame {

    public int right_Camera, left_Camera;
    private int x=-10, y=-10;
    public Controller control = null;
    public IplImage[][] imgArr = new IplImage[2][2];
    public boolean setCamImage = false;
    protected SurfaceSettings settings = new SurfaceSettings();
    private InitialSettings isettings;

    public void setIsettings(InitialSettings isettings) {
        this.isettings = isettings;
    }

    public InitialSettings getIsettings() {
        return isettings;
    }

    public int getRight_Camera() {
        return right_Camera;
    }

    public void setRight_Camera(int right_Camera) {
        getSettings().setRightCam(right_Camera);
        this.right_Camera = right_Camera;
    }

    public int getLeft_Camera() {
        return left_Camera;
    }

    public void setLeft_Camera(int left_Camera) {
        getSettings().setLeftCam(left_Camera);
        this.left_Camera = left_Camera;
    }

    public int getX1() {
        return x;
    }

    public int getY1() {
        return y;
    }

    public void setXY(int x, int y) {
        this.x = x;
        this.y = y;
    }

    public void setLast(int y1, int y2) {
    }

    public int[] getXY() {
        int[] pos = new int[2];
        pos[0] = x;
        pos[1] = y;
        return pos;
    }

    public void setCamera(IplImage liveCam, IplImage skin, int ImageNo) {
        setCamImage = true;
        imgArr[ImageNo][0] = liveCam;
        imgArr[ImageNo][1] = skin;
          }

    public int initializeCamera(int cameraNum) {
        if (cameraNum == left_Camera) {
            return 0;
        } else {
            return 1;
        }
    }

    /**
     * @return the settings
     */
    public SurfaceSettings getSettings() {
        return settings;
    }

    /**3
     * @param settings the settings to set
     */
    public void setSettings(SurfaceSettings settings) {
        this.settings = settings;
    }
}
